package com.cloud.pikachu.csd.controller;

import com.cloud.pikachu.csd.domain.WorkItem;
import com.cloud.pikachu.csd.service.WorkItemService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 工单处理接口
 */
@RestController
@RequestMapping("/csd/workitem")
public class WorkItemController {
    private static final Logger logger = LoggerFactory.getLogger(WorkItemController.class);
    @Autowired
    private WorkItemService workItemService;

    @PostMapping("/later/{orderId}")
    List<WorkItem> selectWorkItems(@PathVariable("orderId") String orderId){
        return workItemService.selectWorkItems(orderId);
    }

}
